<template>
  <div class="SmallPictureHouse">
    <div class="houseItem" v-for="(v,i) in itemArr" :key="i" :class="i != 2 ? 'borderR':''" @click="clickHouse">
      <div class="twoImage">
        <image v-for="img in v.img" :key="img" :src="img" mode="widthFix" />
      </div>
      <div class="title marginBottom15">
        <span class="title1" :style="'color: '+ title1Color">{{v.title}}</span>
        <span>{{ v.titleR }}</span>
      </div>
      <div class="other">
        {{v.attention}}人关注此房
      </div>
      <div class="price">
        {{v.price}} {{v.opp}}
      </div>
    </div>
  </div>
</template>

<script>
export default {
  props: {
    itemArr: {
      type: Array,
      default: []
    },
    title1Color: {
      type: String,
      default: '#1b6cc8'
    }
  },
  methods: {
    clickHouse(){
      this.$emit('clickHouse')
    }
  }
};
</script>

<style socped lang="less">
.SmallPictureHouse {
  // padding: 30rpx 20rpx;
  // box-sizing: border-box;
  // display: flex;
  // justify-content: space-between;
  
  .houseItem {
    width: 230rpx;
    padding: 0 20rpx;
    display: inline-block;
    .twoImage {
      display: flex;
      justify-content: space-between;
      margin-bottom: 20rpx;
      image {
        width: 100rpx;
        height: 100rpx;
      }
    }
  }
  .title {
    font-family: MicrosoftYaHei;
    font-size: 22rpx;
    width: 100%;
    color: #282828;
    .title1 {
      font-weight: normal;
      font-stretch: normal;
      color: #1b6cc8;
    }
  }
  .other{
      font-family: MicrosoftYaHei;
      font-size: 18rpx;
      font-weight: normal;
      font-stretch: normal;
      line-height: 36rpx;
      letter-spacing: 0rpx;
      color: #909090;
  }
  .price{
    font-family: PingFang-SC-Heavy;
    font-size: 26rpx;
    font-weight: bold;
    font-stretch: normal;
    letter-spacing: 0rpx;
    color: #e13c35;
  }
}
.borderR{
  position: relative;
}
.borderR::after{
  content: "";
  width: 1rpx;
  height: 237rpx;
  background-color: #eaeaea;
  position: absolute;
  right: 0;
  top: 20rpx;
}
</style>